package com.ibeetl.cms.dao;

import com.ibeetl.cms.entity.CmsCatalog;
import com.ibeetl.cms.entity.CmsCatalogDict;
import org.beetl.sql.core.annotatoin.SqlResource;
import org.beetl.sql.core.engine.PageQuery;
import org.beetl.sql.core.mapper.BaseMapper;

import java.util.List;

/**
 * CoreCatalogDict Dao
 */
@SqlResource("core.coreCatalogDict")
public interface CmsCatalogDictDao extends BaseMapper<CmsCatalogDict>{
    public PageQuery<CmsCatalogDict> queryByCondition(PageQuery query);
    public void batchDelCoreCatalogDictByIds( List<Long> ids);

    List<Long> getDictIdByCatalog(Long catalogId);

    List<CmsCatalog> getCatalogByDictTypeAndValue(String type, String value, Long parentCatalogId);
    List<CmsCatalog> getCatalogByDictTypeAndValueAndParentCatalogId(String type, String value, String parentCatalogId);
    CmsCatalog getCatalogByCatalogId(Long catalogId);
}